Skip to content

Conversation

eugeneo
Copy link
Contributor

@eugeneo eugeneo commented Jun 16, 2016

Checklist
  • make -j4 test (UNIX) or vcbuild test nosign (Windows) passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

This touches inspector

Description of change

Fix a bug detected by Coverty.

CC: @ofrobots

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jun 16, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Jun 16, 2016

@mscdex mscdex added the inspector Issues and PRs related to the V8 inspector protocol label Jun 16, 2016
@ofrobots
Copy link
Contributor

LGTM. The CI is green.

@bnoordhuis
Copy link
Member

LGTM

The ASSERT_EQ a few lines up should probably be a CHECK_EQ. The buffer is filled with whatever is on the stack if uv_get_process_title() fails. It can't really happen under normal circumstances but better safe than sorry.

@eugeneo
Copy link
Contributor Author

eugeneo commented Jun 16, 2016

@bnoordhuis I'm now setting target title to a default value if the call fails.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use snprintf()? Most static analysis tools will complain about strcpy() (even if it's harmless here.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks!

@bnoordhuis
Copy link
Member

LGTM with a comment.

@ofrobots
Copy link
Contributor

ofrobots pushed a commit that referenced this pull request Jun 17, 2016
PR-URL: #7324
Reviewed-By: cjihrig - Colin Ihrig <[email protected]>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
@ofrobots
Copy link
Contributor

Landed as dfcf02b.

@ofrobots ofrobots closed this Jun 17, 2016
Fishrock123 pushed a commit that referenced this pull request Jul 5, 2016
PR-URL: #7324
Reviewed-By: cjihrig - Colin Ihrig <[email protected]>
Reviewed-By: ofrobots - Ali Ijaz Sheikh <[email protected]>
Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]>
@Fishrock123 Fishrock123 mentioned this pull request Jul 5, 2016
@eugeneo eugeneo deleted the coverty branch August 2, 2016 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. inspector Issues and PRs related to the V8 inspector protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants